package com.zhaotianhao.rentingservice.api;

import com.zhaotianhao.rentingservice.common.JsonResult;
import com.zhaotianhao.rentingservice.entity.Type;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * @Author Z-7
 * @Date 2022/5/16
 */
@Component
@FeignClient(name = "basic-service",path = "/type",fallback = TypeApiFallback.class)
public interface TypeApi {
    @GetMapping("getAllType")
    JsonResult getAllType();

    @GetMapping("getById")
    Type getById(@RequestParam(value = "id") Integer id);
}
